package org.shj.pattern.decorator

class Decorator(sharp: Sharp) extends Sharp{
  def draw(){
    sharp.draw()
  }  
}

class RedDecorator(sharp: Sharp) extends Decorator(sharp){
  override def draw(){
    super.draw()
    addRedBorder()
  }
  
  def addRedBorder(){
    println("add red border")
  }
}

class BoldDecorator(sharp: Sharp) extends Decorator(sharp){
  override def draw(){
    super.draw()
    addBoldBorder()
  }
  
  def addBoldBorder(){
    println("add bold border")
  }
}